package com.yexx.sc.microsvr.organization.controller;

import com.yexx.sc.microsvr.organization.service.CityService;
import com.yexx.sc.microsvrapi.domain.City;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/city")
@Api(tags = "城市服务")
public class CityController {

    @Autowired
    CityService cityService;

    @ApiOperation("列表")
    @GetMapping("/list")
    public List<City> list(){
        return cityService.getList();
    }
}
